package com.nice.app.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.nice.app.domain.User;
import com.nice.app.service.UserService;


@Controller
public class LoginController {
	
	@Autowired
	private UserService userService;
	
	@RequestMapping(value = "/login")
	public String login(Model model) {

//		some login code
		
		List<User> list = userService.findUser();
		
		model.addAttribute("userList", list);
		
        return "nice";
    }
	
	
}
